/*
 *  Copyright 2020-2025 the original author or authors.
 *  You cannot use this file unless authorized by the author.
 */

package org.ipig.model;

import lombok.Data;
import lombok.ToString;
import org.ipig.constants.DataCnst;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * 集合配置信息[code唯一]
 *
 * @author <a href="mailto:comchnts@163.com">chinats</a>
 * @version $$Id$$
 * @since 1.0
 */
@Data
@ToString
public class CollectionConf implements Serializable {
    //唯一编码
    private String code;
    //集合名称
    private String name;
    //集合分片字段，多个按照顺序以逗号隔开
    private String shardKeys;
    //所属领域
    private String domain;
    //所属领域下的类型
    private String type;
    //批注,注释,说明
    private String notes;
    //拥有的字段【包括是否为元数据字段】
//    private Map<String, Object> fieldMap = new HashMap<String, Object>();
    private Map<String, Object> fields = new HashMap<String, Object>();
    //拥有的索引
    private Map<String, Object> indexs = new HashMap<String, Object>();
    //数据量
    private Long size;
    //调试标识 默认关闭
    private Boolean debugEnable = Boolean.valueOf(false);
    //逻辑删除标识
    private String deletedFlag = DataCnst.FLAG_NORMAL;
    //createTime
    private String createTime;
    //creatorId
    private String creatorId;
    //modifyTime
    private String modifyTime;
    //modifierId
    private String modifierId;
    // 其它属性
    private Map<String, Object> props = new HashMap<String, Object>();
}

